<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c" %>


<jsp:include page="../header.jsp"></jsp:include>
	<table class="layui-table" lay-even lay-size="lg">
	<caption>部门列表</caption>
	<thead>
	  <tr>
	    <th>Id</th>
	    <th>部门名称</th>
	    <th>部门地点</th>
	    <th>联系电话</th>
	    <th>操作</th>
	  </tr>
	</thead>
	
	<tbody>
	<c:forEach items="${depts }" var = "dept">
	  <tr>
	    <td><a href="dept.do?action=query&deptid=${dept.id}">${dept.id }</a></td>
	    <td>${dept.name }</td>
	    <td>${dept.room }</td>
	    <td>${dept.phone }</td>
	    <td>
	    
	    <a 	class="layui-btn layui-btn-radius layui-btn-danger layui-btn-sm" href="javascript: if(window.confirm('是否删除？')){window.location.href='dept/remove?id=${dept.id}'}" >删除</a>
	     <a class="layui-btn layui-btn-radius layui-btn-normal layui-btn-sm" href= "dept/editById?id=${dept.id }">编辑</a>
	    </td>
	  <tr>
	  </c:forEach>
	</tbody>
	</table>
<jsp:include page="../footer.jsp"></jsp:include>
